package com.zhijiaoyun.controller.base;

import com.zhijiaoyun.common.ResponseUtils;
import com.zhijiaoyun.service.*;

import javax.annotation.Resource;

/**
 * @author shisfish
 * @date 2017/6/6
 */
public class BaseController extends ResponseUtils {

    @Resource
    protected ITestService testService;

    @Resource
    protected IUserService userService;

    @Resource
    protected ITeacherService teacherService;

    @Resource
    protected IAdminService adminService;

    @Resource
    protected IWebsiteLinkService websiteLinkService;

    @Resource
    protected IAuthorityService authorityService;

    @Resource
    protected ICourseService courseService;

    @Resource
    protected ICourseCategoryService courseCategoryService;

    @Resource
    protected IRECourseCategoryService reCourseCategoryService;

    @Resource
    protected ICourseHistoryService courseHistoryService;

    @Resource
    protected ILearnHistoryService learnHistoryService;

    @Resource
    protected ILessonService lessonService;

    @Resource
    protected IFastNavigationService fastNavigationService;

    @Resource
    protected IHelpCenterService helpCenterService;

    @Resource
    protected ICollectionService collectionService;

    @Resource
    protected IShoppingCartService shoppingCartService;

    @Resource
    protected ICourseRecommendService courseRecommendService;

    @Resource
    protected IMarkService markService;

    @Resource
    protected IBannerService bannerService;

    @Resource
    protected INewsService newsService;

    @Resource
    protected INewsRecommendService newsRecommendService;

    @Resource
    protected INewsViewService newsViewService;

    @Resource
    protected IOrderService orderService;

    @Resource
    protected IOrderDetailService orderDetailService;

    @Resource
    protected IBuyHistoryService buyHistoryService;

    @Resource
    protected ICourseViewService courseViewService;

    @Resource
    protected ILogService logService;

    @Resource
    protected  ILoginService loginService;

    @Resource
    protected  IFeedBackServie feedBackServie;

    @Resource
    protected IExcelService excelService;

    @Resource
    protected IItemService itemService;

    protected int setPageIndex(int pageIndex) {
        return pageIndex <= 0 ? 1 : pageIndex;
    }

    protected int setPageSize(int pageSize, int defaultSize) {
        return pageSize <= 0 ? defaultSize : pageSize;
    }

}
